{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
<div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="index.php?a=header.order&staff_id={%$header_data.staff_id%}" method="post">
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title" >班级座号安排</p>
            <div style="float: right;">
    <span style="color: #fe6568">请选择班级</span>&nbsp;&nbsp;&nbsp;<select id="grades">
          {%foreach from=$class_lists key=key item=val%}
 <option value="{%$val.class_id%}"  >{%$val.class_name%}</option>
          {%/foreach%}  
       </select> 
               <input type="button" class="btn btn-sm btn-success" value="确认选择" id="enter" >
               <input type="button" class="btn btn-sm btn-info" value="查看学生期末评语" id="eval" >
               <input type="button" class="btn btn-sm btn-info" value="查看学生日常备忘录" id="memory" >
                 </div>
                </div>

                   <div class="box-body">
               <table class="table table-bordered table-striped"  id="mytable">   <thead>
                            <tr style="background-color:#a273ff;">
                                        <td>班级号</td>
                                        <td>学号</td>
                                        <td>姓名</td>
                                        <td>性别</td>
                                        <td>班内职位</td>
                                        <td width="20%">座号</td>
                                        <td width="180">选择职务</td>
                                    </tr>
                                </thead>
                                <tbody>
                                {%foreach from=$seat_lists key=key item=value%}
                                    <tr>
                                        <td>{%$value.class_id%}</td>
                                        <td>{%$value.student_id%}</td>
                                        <td>{%$value.student_name%}</td>
                                        <td>{%$value.student_sex%}</td>
                                        <td>{%$value.student_job%}</td>
                                        <td><input type="number" name="{%$value.student_id%}" value="{%$value.student_seat%}" min="1" max="99"></td>
                                        <td>
                                          <a href="index.php?a=header.update&student_id={%$value.student_id%}" class="btn btn-warning btn-xs">修改职务</a>
                                          <a href="index.php?a=header.del&student_id={%$value.student_id%}" class="btn btn-danger btn-xs" onclick="if(confirm('警告！确认删除信息?')==false)return false;">删除职务</a></td>
                                    </tr>   
                                {%/foreach%}  
                            </tbody>
                        </table>                     
                   </div><!--box-body -->
                     <div class="box-footer text-center">
                         <button type="submit"   class="btn btn-primary">修改座号</button>
                   </div>
               </form>
              {%$page%}
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
</div>
 <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script type="text/javascript">
  $(function(){
    $("#enter").click(function(){
      class_id=$("#grades").find("option:selected").val()
    window.location="http://schoolplat.wangyunw.com/public/index.php?a=header.newlist&staff_id={%$header_data.staff_id%}&class_id="+class_id
    })
$("#eval").click(function(){
  class_id=$("#grades").find("option:selected").val()
    window.location="http://schoolplat.wangyunw.com/public/index.php?a=header.eval&class_id="+class_id
})
$("#memory").click(function(){
  class_id=$("#grades").find("option:selected").val()
  window.location="http://schoolplat.wangyunw.com/public/index.php?a=header.mem&class_id="+class_id
})
  })
</script>



